import java.util.ArrayList;
import java.util.List;

import sun.text.normalizer.CharTrie.FriendAgent;


public class GenericList{
	
	public static void main(String[] args) {
		List<Fruit> fruit = new ArrayList<Fruit>();
		fruit.add(new Fruit());
		fruit.add(new Apple());

//		List<Fruit> apple = new ArrayList<Apple>();
//		apple.add(new Fruit());
//		apple.add(new Apple());
		
		List<? extends Fruit> first = new ArrayList<Apple>();
//		first.add(new Apple());
//		first.add(new Fruit());
//		first.add(new Object());
		
		List<? super Fruit> alist = new ArrayList<Fruit>();
		alist.add(new Fruit());
		alist.add(new Apple());
		
	}
	
}

class Fruit {

}

class Apple extends Fruit{
	
}


